package com.easylinkin.linkappapi.taskscheduler.service;

import com.easylinkin.linkappapi.taskscheduler.entity.JobEntity;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p></p>
 *
 * @author TongJie
 * @since 2020/6/5 18:25
 */
public interface TaskSchedulerService {

    @Transactional(rollbackFor = Exception.class)
    void saveTask(JobEntity record);

    @Transactional(rollbackFor = Exception.class)
    void saveOrUpdateTaskSetStartTime(JobEntity record);

    void trigger(JobEntity record);

    //暂停
    void pause(JobEntity record);

    //恢复
    void resume(JobEntity record);

    @Transactional(rollbackFor = Exception.class)
    void remove(JobEntity jobEntity);

    @Transactional(rollbackFor = Exception.class)
    void updateTask(JobEntity record);
}
